package org.jeecg.modules.qy.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import org.jeecg.common.aspect.annotation.Dict;
import org.jeecgframework.poi.excel.annotation.Excel;
import org.springframework.format.annotation.DateTimeFormat;

import java.io.Serializable;
import java.util.Date;
import java.util.List;

/**
 * @Description: 商品表
 * @Author: jeecg-boot
 * @Date:   2021-03-10
 * @Version: V1.0
 */
@Data
@TableName("qy_commodity")
@Accessors(chain = true)
@EqualsAndHashCode(callSuper = false)
@ApiModel(value="qy_commodity对象", description="商品表")
public class QyCommodity implements Serializable {
    private static final long serialVersionUID = 1L;

	/**主键*/
	@TableId(type = IdType.ASSIGN_ID)
    @ApiModelProperty(value = "主键")
    private String id;
	/**创建人*/
    @ApiModelProperty(value = "创建人")
    private String createBy;
	/**创建日期*/
	@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
    @ApiModelProperty(value = "创建日期")
    private Date createTime;
	/**更新人*/
    @ApiModelProperty(value = "更新人")
    private String updateBy;
	/**更新日期*/
	@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
    @ApiModelProperty(value = "更新日期")
    private Date updateTime;
	/**公司ID*/
	@Excel(name = "公司ID", width = 15)
    @ApiModelProperty(value = "公司ID")
    private String companyId;
	/**溯源类型*/
	@Excel(name = "溯源类型", width = 15, dicCode = "commodity_type")
	@Dict(dicCode = "commodity_type")
    @ApiModelProperty(value = "溯源类型")
    private Integer commodityType;
	/**商品名称*/
	@Excel(name = "商品名称", width = 15)
    @ApiModelProperty(value = "商品名称")
    private String commodityName;
	/**商品图片*/
	@Excel(name = "商品图片", width = 15)
    @ApiModelProperty(value = "商品图片")
    private String commodityImg;
	/**一物一码剩余个数*/
	@Excel(name = "一物一码剩余个数", width = 15)
    @ApiModelProperty(value = "一物一码剩余个数")
    private Integer oneCodeNum;
	/**一物一码累计个数*/
	@Excel(name = "一物一码累计个数", width = 15)
    @ApiModelProperty(value = "一物一码累计个数")
    private Integer oneCodeTotalNum;
	/**N物一码剩余个数*/
	@Excel(name = "N物一码剩余个数", width = 15)
    @ApiModelProperty(value = "N物一码剩余个数")
    private Integer muchCodeNum;
	/**N物一码累计个数*/
	@Excel(name = "N物一码累计个数", width = 15)
    @ApiModelProperty(value = "N物一码累计个数")
    private Integer muchCodeTotalNum;
	/**版本号*/
	@Excel(name = "版本号", width = 15)
    @ApiModelProperty(value = "版本号")
    private Integer version;

    /**商品状态*/
    @Excel(name = "商品状态", width = 15)
    @ApiModelProperty(value = "商品状态")
    private Integer commodityStatus;

	@TableField(exist = false)
	private List<QyCommodityAttribute> commodityAttributeList;

    @TableField(exist = false)
	private Integer commodityNum;
}
